import axios from "axios";
import qs from "query-string";

export default {
  /**
   * 服务是否活跃
   * @method
   * @name isActive
   */
  isActive: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/active";
    let body = {};
    let queryParameters = params;
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 添加管理员
   * @method
   * @name addAdminUser
   */
  addAdminUser: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/admin/users";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["username"] !== undefined) {
      queryParameters["username"] = params["username"];
    }

    if (params["username"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: username"));
    }

    if (params["password"] !== undefined) {
      queryParameters["password"] = params["password"];
    }

    if (params["password"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: password"));
    }

    if (params["name"] !== undefined) {
      queryParameters["name"] = params["name"];
    }

    if (params["name"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: name"));
    }

    if (params["mobile"] !== undefined) {
      queryParameters["mobile"] = params["mobile"];
    }

    if (params["mobile"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: mobile"));
    }

    if (params["userRole"] !== undefined) {
      queryParameters["userRole"] = params["userRole"];
    }

    if (params["userRole"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: userRole"));
    }

    if (params["area"] !== undefined) {
      queryParameters["area"] = params["area"];
    }

    let url = domain + path;
    let options = {
      method: "POST",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 更新管理员
   * @method
   * @name updateAdminUser
   */
  updateAdminUser: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/admin/users";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["userId"] !== undefined) {
      queryParameters["userId"] = params["userId"];
    }

    if (params["userId"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: userId"));
    }

    if (params["name"] !== undefined) {
      queryParameters["name"] = params["name"];
    }

    if (params["name"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: name"));
    }

    if (params["mobile"] !== undefined) {
      queryParameters["mobile"] = params["mobile"];
    }

    if (params["mobile"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: mobile"));
    }

    if (params["userRole"] !== undefined) {
      queryParameters["userRole"] = params["userRole"];
    }

    if (params["userRole"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: userRole"));
    }

    if (params["area"] !== undefined) {
      queryParameters["area"] = params["area"];
    }

    let url = domain + path;
    let options = {
      method: "PUT",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 获取管理员个人信息
   * @method
   * @name getAdminInfo
   */
  getAdminInfo: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/admin/users/ownInfo";
    let body = {};
    let queryParameters = params;
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 获取adminUser分页
   * @method
   * @name getAdminUserPage
   */
  getAdminUserPage: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/admin/users/page";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["pageIndex"] !== undefined) {
      queryParameters["pageIndex"] = params["pageIndex"];
    }

    if (params["pageSize"] !== undefined) {
      queryParameters["pageSize"] = params["pageSize"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 获取管理员
   * @method
   * @name getAdminUser
   */
  getAdminUser: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/admin/users/{id}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    path = path.replace("{id}", params["id"]);

    if (params["id"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: id"));
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 删除adminUser
   * @method
   * @name deleteAdminUser
   */
  deleteAdminUser: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/admin/users/{id}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    path = path.replace("{id}", params["id"]);

    if (params["id"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: id"));
    }

    let url = domain + path;
    let options = {
      method: "DELETE",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 服务是否活跃
   * @method
   * @name active
   */
  active: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/auth/login";
    let body = {};
    let queryParameters = params;
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 登录
   * @method
   * @name login
   */
  login: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/auth/login";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/x-www-form-urlencoded;charset=UTF-8";

    if (params["username"] !== undefined) {
      form["username"] = params["username"];
    }

    if (params["username"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: username"));
    }

    if (params["password"] !== undefined) {
      form["password"] = params["password"];
    }

    if (params["password"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: password"));
    }

    let url = domain + path;
    let options = {
      method: "POST",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 退出
   * @method
   * @name loginOut
   */
  loginOut: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/auth/login";
    let body = {};
    let queryParameters = params;
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";

    let url = domain + path;
    let options = {
      method: "DELETE",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 添加（修改）一个菜单
   * @method
   * @name addMenu
   */
  addMenu: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/auth/menus";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["body"] !== undefined) {
      body = params["body"];
    }

    let url = domain + path;
    let options = {
      method: "POST",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 获取一个系统全部的菜单按钮树ID（用于数据库添加超级管理员数据）
   * @method
   * @name getMenuIDTree
   */
  getMenuIDTree: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/auth/menus/menuIDTree";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";

    if (params["menuSys"] !== undefined) {
      queryParameters["menuSys"] = params["menuSys"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 获取一个系统全部的菜单按钮树(用于菜单管理）
   * @method
   * @name getMenuTree
   */
  getMenuTree: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/auth/menus/menuTree";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";

    if (params["menuSys"] !== undefined) {
      queryParameters["menuSys"] = params["menuSys"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 获取一个菜单详情
   * @method
   * @name getOneMenu
   */
  getOneMenu: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/auth/menus/{id}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";

    path = path.replace("{id}", params["id"]);

    if (params["id"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: id"));
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 删除一个菜单
   * @method
   * @name deleteMenu
   */
  deleteMenu: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/auth/menus/{id}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";

    path = path.replace("{id}", params["id"]);

    if (params["id"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: id"));
    }

    let url = domain + path;
    let options = {
      method: "DELETE",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 获取该用户创建的所有角色
   * @method
   * @name getRoles
   */
  getRoles: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/auth/roles";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";

    if (params["userId"] !== undefined) {
      queryParameters["userId"] = params["userId"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 添加（更新）角色
   * @method
   * @name addOrUpdateRole
   */
  addOrUpdateRole: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/auth/roles";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["body"] !== undefined) {
      body = params["body"];
    }

    let url = domain + path;
    let options = {
      method: "POST",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 判断角色编码是否重复
   * @method
   * @name judgeRoleNum
   */
  judgeRoleNum: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/auth/roles/judgeRoleNum";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";

    if (params["roleId"] !== undefined) {
      queryParameters["roleId"] = params["roleId"];
    }

    if (params["roleNum"] !== undefined) {
      queryParameters["roleNum"] = params["roleNum"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 获取角色-分页
   * @method
   * @name getRolesPage
   */
  getRolesPage: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/auth/roles/page";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";

    if (params["pageIndex"] !== undefined) {
      queryParameters["pageIndex"] = params["pageIndex"];
    }

    if (params["pageSize"] !== undefined) {
      queryParameters["pageSize"] = params["pageSize"];
    }

    if (params["roleName"] !== undefined) {
      queryParameters["roleName"] = params["roleName"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 删除角色
   * @method
   * @name deleteRole
   */
  deleteRole: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/auth/roles/{roleId}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";

    path = path.replace("{roleId}", params["roleId"]);

    if (params["roleId"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: roleId"));
    }

    let url = domain + path;
    let options = {
      method: "DELETE",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 获取角色的所有用户
   * @method
   * @name getRoleUsers
   */
  getRoleUsers: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/auth/roles/{roleId}/users";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";

    path = path.replace("{roleId}", params["roleId"]);

    if (params["roleId"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: roleId"));
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 获取管理员
   * @method
   * @name getAuthUsers
   */
  getAuthUsers: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/auth/users";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";

    if (params["pageIndex"] !== undefined) {
      queryParameters["pageIndex"] = params["pageIndex"];
    }

    if (params["pageSize"] !== undefined) {
      queryParameters["pageSize"] = params["pageSize"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 添加管理员
   * @method
   * @name addAuthUser
   */
  addAuthUser: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/auth/users";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";

    if (params["username"] !== undefined) {
      queryParameters["username"] = params["username"];
    }

    if (params["username"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: username"));
    }

    if (params["password"] !== undefined) {
      queryParameters["password"] = params["password"];
    }

    if (params["password"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: password"));
    }

    if (params["name"] !== undefined) {
      queryParameters["name"] = params["name"];
    }

    if (params["name"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: name"));
    }

    if (params["mobile"] !== undefined) {
      queryParameters["mobile"] = params["mobile"];
    }

    if (params["mobile"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: mobile"));
    }

    if (params["userRole"] !== undefined) {
      queryParameters["userRole"] = params["userRole"];
    }

    if (params["userRole"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: userRole"));
    }

    let url = domain + path;
    let options = {
      method: "POST",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 更新管理员
   * @method
   * @name updateAuthUser
   */
  updateAuthUser: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/auth/users";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";

    if (params["userId"] !== undefined) {
      queryParameters["userId"] = params["userId"];
    }

    if (params["userId"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: userId"));
    }

    if (params["name"] !== undefined) {
      queryParameters["name"] = params["name"];
    }

    if (params["name"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: name"));
    }

    if (params["mobile"] !== undefined) {
      queryParameters["mobile"] = params["mobile"];
    }

    if (params["mobile"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: mobile"));
    }

    if (params["userRole"] !== undefined) {
      queryParameters["userRole"] = params["userRole"];
    }

    let url = domain + path;
    let options = {
      method: "PUT",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 删除管理员（只能删除自己创建的）
   * @method
   * @name deleteUser
   */
  deleteUser: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/auth/users";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";

    if (params["userId"] !== undefined) {
      queryParameters["userId"] = params["userId"];
    }

    let url = domain + path;
    let options = {
      method: "DELETE",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 获取用户组合的菜单按钮树
   * @method
   * @name getAuthUserMenus
   */
  getAuthUserMenus: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/auth/users/menus";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";

    if (params["menuSys"] !== undefined) {
      queryParameters["menuSys"] = params["menuSys"];
    }

    if (params["parentMenuId"] !== undefined) {
      queryParameters["parentMenuId"] = params["parentMenuId"];
    }

    if (params["hasButton"] !== undefined) {
      queryParameters["hasButton"] = params["hasButton"];
    }

    if (params["hasChildren"] !== undefined) {
      queryParameters["hasChildren"] = params["hasChildren"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 获取管理员个人信息
   * @method
   * @name getAuthUser
   */
  getAuthUser: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/auth/users/ownInfo";
    let body = {};
    let queryParameters = params;
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 获取自己所有的权限
   * @method
   * @name getAuthUserPermissions
   */
  getAuthUserPermissions: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/auth/users/permissions";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";

    if (params["menuSys"] !== undefined) {
      queryParameters["menuSys"] = params["menuSys"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 重置自己创建的管理员密码
   * @method
   * @name resetAuthUserPassword
   */
  resetAuthUserPassword: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/auth/users/resetPassword";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/x-www-form-urlencoded;charset=UTF-8";

    if (params["userId"] !== undefined) {
      form["userId"] = params["userId"];
    }

    if (params["userId"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: userId"));
    }

    if (params["password"] !== undefined) {
      form["password"] = params["password"];
    }

    let url = domain + path;
    let options = {
      method: "PUT",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 获取用户的所有角色
   * @method
   * @name getUserRoles
   */
  getUserRoles: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/auth/users/roles";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";

    if (params["userId"] !== undefined) {
      queryParameters["userId"] = params["userId"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 添加用户角色关系
   * @method
   * @name addUserRole
   */
  addUserRole: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/auth/users/roles";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/x-www-form-urlencoded;charset=UTF-8";

    if (params["userId"] !== undefined) {
      form["userId"] = params["userId"];
    }

    if (params["userId"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: userId"));
    }

    if (params["roleId"] !== undefined) {
      form["roleId"] = params["roleId"];
    }

    if (params["roleId"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: roleId"));
    }

    let url = domain + path;
    let options = {
      method: "POST",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 删除用户角色关系
   * @method
   * @name deleteAuthUserRole
   */
  deleteAuthUserRole: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/auth/users/roles";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";

    if (params["userId"] !== undefined) {
      queryParameters["userId"] = params["userId"];
    }

    if (params["userId"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: userId"));
    }

    if (params["roleId"] !== undefined) {
      queryParameters["roleId"] = params["roleId"];
    }

    if (params["roleId"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: roleId"));
    }

    let url = domain + path;
    let options = {
      method: "DELETE",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 修改用户可用状态
   * @method
   * @name updateAuthUserState
   */
  updateAuthUserState: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/auth/users/state";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/x-www-form-urlencoded;charset=UTF-8";

    if (params["userId"] !== undefined) {
      form["userId"] = params["userId"];
    }

    if (params["userId"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: userId"));
    }

    if (params["state"] !== undefined) {
      form["state"] = params["state"];
    }

    if (params["state"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: state"));
    }

    let url = domain + path;
    let options = {
      method: "PUT",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 修改密码
   * @method
   * @name updateAuthUserPassword
   */
  updateAuthUserPassword: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/auth/users/updatePassword";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/x-www-form-urlencoded;charset=UTF-8";

    if (params["oldPassword"] !== undefined) {
      form["oldPassword"] = params["oldPassword"];
    }

    if (params["newPassword"] !== undefined) {
      form["newPassword"] = params["newPassword"];
    }

    let url = domain + path;
    let options = {
      method: "PUT",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 获取一个用户的信息
   * @method
   * @name getOneUserInfo
   */
  getOneUserInfo: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/auth/users/{userId}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";

    path = path.replace("{userId}", params["userId"]);

    if (params["userId"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: userId"));
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 活动-添加|更新
   * @method
   * @name addOrUpdateContent
   */
  addOrUpdateContent: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/content";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["body"] !== undefined) {
      body = params["body"];
    }

    let url = domain + path;
    let options = {
      method: "POST",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 活动-获取分页
   * @method
   * @name getContentPage
   */
  getContentPage: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/content/page";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["pageIndex"] !== undefined) {
      queryParameters["pageIndex"] = params["pageIndex"];
    }

    if (params["pageSize"] !== undefined) {
      queryParameters["pageSize"] = params["pageSize"];
    }

    if (params["title"] !== undefined) {
      queryParameters["title"] = params["title"];
    }

    if (params["status"] !== undefined) {
      queryParameters["status"] = params["status"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 活动-删除
   * @method
   * @name deleteContent
   */
  deleteContent: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/content/{id}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    path = path.replace("{id}", params["id"]);

    if (params["id"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: id"));
    }

    let url = domain + path;
    let options = {
      method: "DELETE",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 活动-置顶显示活动
   * @method
   * @name topContent
   */
  topContent: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/content/{id}/top";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    path = path.replace("{id}", params["id"]);

    if (params["id"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: id"));
    }

    let url = domain + path;
    let options = {
      method: "POST",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 中控室-添加|更新
   * @method
   * @name addOrUpdateControlRoom
   */
  addOrUpdateControlRoom: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/controlRoom";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["body"] !== undefined) {
      body = params["body"];
    }

    let url = domain + path;
    let options = {
      method: "POST",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 中控室-获取分页
   * @method
   * @name getControlRoomPage
   */
  getControlRoomPage: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/controlRoom/page";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["pageIndex"] !== undefined) {
      queryParameters["pageIndex"] = params["pageIndex"];
    }

    if (params["pageSize"] !== undefined) {
      queryParameters["pageSize"] = params["pageSize"];
    }

    if (params["name"] !== undefined) {
      queryParameters["name"] = params["name"];
    }

    if (params["deptId"] !== undefined) {
      queryParameters["deptId"] = params["deptId"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 中控室-获取单个
   * @method
   * @name getControlRoom
   */
  getControlRoom: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/controlRoom/{id}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    path = path.replace("{id}", params["id"]);

    if (params["id"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: id"));
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 中控室-删除
   * @method
   * @name deleteControlRoom
   */
  deleteControlRoom: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/controlRoom/{id}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    path = path.replace("{id}", params["id"]);

    if (params["id"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: id"));
    }

    let url = domain + path;
    let options = {
      method: "DELETE",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 企业-获取企业分页
   * @method
   * @name getDepartPage
   */
  getDepartPage: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/depart";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["pageIndex"] !== undefined) {
      queryParameters["pageIndex"] = params["pageIndex"];
    }

    if (params["pageSize"] !== undefined) {
      queryParameters["pageSize"] = params["pageSize"];
    }

    if (params["name"] !== undefined) {
      queryParameters["name"] = params["name"];
    }

    if (params["area"] !== undefined) {
      queryParameters["area"] = params["area"];
    }

    if (params["categoryId"] !== undefined) {
      queryParameters["categoryId"] = params["categoryId"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 添加企业
   * @method
   * @name addDepart
   */
  addDepart: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/depart";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["body"] !== undefined) {
      body = params["body"];
    }

    let url = domain + path;
    let options = {
      method: "POST",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 更新企业
   * @method
   * @name updateDepart
   */
  updateDepart: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/depart";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["body"] !== undefined) {
      body = params["body"];
    }

    let url = domain + path;
    let options = {
      method: "PUT",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 获取企业分类
   * @method
   * @name getDepartCategories
   */
  getDepartCategories: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/depart/categories";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["name"] !== undefined) {
      queryParameters["name"] = params["name"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 添加分类
   * @method
   * @name addCategories
   */
  addCategories: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/depart/categories";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["body"] !== undefined) {
      body = params["body"];
    }

    let url = domain + path;
    let options = {
      method: "POST",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 删除分类
   * @method
   * @name deleteCategories
   */
  deleteCategories: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/depart/categories/{categoryId}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    path = path.replace("{categoryId}", params["categoryId"]);

    if (params["categoryId"] === undefined) {
      return Promise.reject(
        new Error("Missing required  parameter: categoryId")
      );
    }

    let url = domain + path;
    let options = {
      method: "DELETE",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 导入企业
   * @method
   * @name importDepart
   */
  importDepart: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/depart/import/{fileName}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    path = path.replace("{fileName}", params["fileName"]);

    if (params["fileName"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: fileName"));
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 企业-获取列表
   * @method
   * @name getDepartList
   */
  getDepartList: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/depart/list";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["name"] !== undefined) {
      queryParameters["name"] = params["name"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 重置企业管理员密码
   * @method
   * @name resetComPassword
   */
  resetComPassword: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/depart/resetPassword";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/x-www-form-urlencoded";

    if (params["username"] !== undefined) {
      form["username"] = params["username"];
    }

    if (params["username"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: username"));
    }

    if (params["password"] !== undefined) {
      form["password"] = params["password"];
    }

    if (params["password"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: password"));
    }

    let url = domain + path;
    let options = {
      method: "PUT",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 导入用户
   * @method
   * @name importUser
   */
  importUser: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/depart/user/import/{fileName}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    path = path.replace("{fileName}", params["fileName"]);

    if (params["fileName"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: fileName"));
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 获取单个企业
   * @method
   * @name getDepart
   */
  getDepart: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/depart/{id}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    path = path.replace("{id}", params["id"]);

    if (params["id"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: id"));
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 删除企业
   * @method
   * @name deleteDepart
   */
  deleteDepart: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/depart/{id}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    path = path.replace("{id}", params["id"]);

    if (params["id"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: id"));
    }

    let url = domain + path;
    let options = {
      method: "DELETE",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 评论-获取discuss分页
   * @method
   * @name getDiscussPage
   */
  getDiscussPage: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/discuss/page";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["pageIndex"] !== undefined) {
      queryParameters["pageIndex"] = params["pageIndex"];
    }

    if (params["pageSize"] !== undefined) {
      queryParameters["pageSize"] = params["pageSize"];
    }

    if (params["newsId"] !== undefined) {
      queryParameters["newsId"] = params["newsId"];
    }

    if (params["comment"] !== undefined) {
      queryParameters["comment"] = params["comment"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 评论-获取单个
   * @method
   * @name getDiscuss
   */
  getDiscuss: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/discuss/{id}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    path = path.replace("{id}", params["id"]);

    if (params["id"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: id"));
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 评论-删除
   * @method
   * @name deleteDiscuss
   */
  deleteDiscuss: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/discuss/{id}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    path = path.replace("{id}", params["id"]);

    if (params["id"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: id"));
    }

    let url = domain + path;
    let options = {
      method: "DELETE",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 删除文件
   * @method
   * @name deleteFile
   */
  deleteFile: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/file/files/files";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";

    if (params["fileName"] !== undefined) {
      queryParameters["fileName"] = params["fileName"];
    }

    let url = domain + path;
    let options = {
      method: "DELETE",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 七牛客户端获取token后上传到七牛成功，携带有处理参数，返回persistentId回传服务端。
   * @method
   * @name clientUploadSuccess
   */
  clientUploadSuccess: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/file/files/qiniu/clientUploadSuccess";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Content-Type"] = "application/x-www-form-urlencoded";

    if (params["key"] !== undefined) {
      form["key"] = params["key"];
    }

    if (params["persistentId"] !== undefined) {
      form["persistentId"] = params["persistentId"];
    }

    let url = domain + path;
    let options = {
      method: "POST",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 百度富文本编辑框获取配置接口
   * @method
   * @name ueditorGetConfig
   */
  ueditorGetConfig: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/file/files/qiniu/ueditor";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "text/html";

    if (params["action"] !== undefined) {
      queryParameters["action"] = params["action"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 百度富文本编编辑器上传文件接口
   * @method
   * @name ueditorServerUrl
   */
  ueditorServerUrl: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/file/files/qiniu/ueditor";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "multipart/form-data";

    if (params["upfile"] !== undefined) {
      form["upfile"] = params["upfile"];
    }

    let url = domain + path;
    let options = {
      method: "POST",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 获取上传文件的token
   * @method
   * @name getUploadFileToken
   */
  getUploadFileToken: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/file/files/qiniu/upLoadToken";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";

    if (params["fileName"] !== undefined) {
      queryParameters["fileName"] = params["fileName"];
    }

    if (params["bucket"] !== undefined) {
      queryParameters["bucket"] = params["bucket"];
    }

    if (params["persistentOps"] !== undefined) {
      queryParameters["persistentOps"] = params["persistentOps"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 上传文件到七牛服务器,返回文件名称
   * @method
   * @name uploadQiNiuFile
   */
  uploadQiNiuFile: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/file/files/qiniu/upload";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "multipart/form-data";

    if (params["useOriginalFileName"] !== undefined) {
      form["useOriginalFileName"] = params["useOriginalFileName"];
    }

    if (params["bucket"] !== undefined) {
      queryParameters["bucket"] = params["bucket"];
    }

    if (params["persistentOps"] !== undefined) {
      form["persistentOps"] = params["persistentOps"];
    }

    if (params["file"] !== undefined) {
      form["file"] = params["file"];
    }

    let url = domain + path;
    let options = {
      method: "POST",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 添加|更新 gift
   * @method
   * @name addOrUpdateGift
   */
  addOrUpdateGift: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/gift";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["body"] !== undefined) {
      body = params["body"];
    }

    let url = domain + path;
    let options = {
      method: "POST",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 获取所有商品分类
   * @method
   * @name getAllCategory
   */
  getAllCategory: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/gift/categories";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["status"] !== undefined) {
      queryParameters["status"] = params["status"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 获取gift分页
   * @method
   * @name getGiftPage
   */
  getGiftPage: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/gift/page";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["pageIndex"] !== undefined) {
      queryParameters["pageIndex"] = params["pageIndex"];
    }

    if (params["pageSize"] !== undefined) {
      queryParameters["pageSize"] = params["pageSize"];
    }

    if (params["title"] !== undefined) {
      queryParameters["title"] = params["title"];
    }

    if (params["status"] !== undefined) {
      queryParameters["status"] = params["status"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 获取单个gift
   * @method
   * @name getGift
   */
  getGift: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/gift/{id}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    path = path.replace("{id}", params["id"]);

    if (params["id"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: id"));
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 删除gift
   * @method
   * @name deleteGift
   */
  deleteGift: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/gift/{id}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    path = path.replace("{id}", params["id"]);

    if (params["id"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: id"));
    }

    let url = domain + path;
    let options = {
      method: "DELETE",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 置顶gift
   * @method
   * @name topGift
   */
  topGift: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/gift/{id}/top";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/x-www-form-urlencoded";

    path = path.replace("{id}", params["id"]);

    if (params["id"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: id"));
    }

    let url = domain + path;
    let options = {
      method: "POST",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 订单获取分页
   * @method
   * @name getGiftOrderPage
   */
  getGiftOrderPage: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/giftOrder/page";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["pageIndex"] !== undefined) {
      queryParameters["pageIndex"] = params["pageIndex"];
    }

    if (params["pageSize"] !== undefined) {
      queryParameters["pageSize"] = params["pageSize"];
    }

    if (params["orderNo"] !== undefined) {
      queryParameters["orderNo"] = params["orderNo"];
    }

    if (params["verifyCode"] !== undefined) {
      queryParameters["verifyCode"] = params["verifyCode"];
    }

    if (params["giftTitle"] !== undefined) {
      queryParameters["giftTitle"] = params["giftTitle"];
    }

    if (params["status"] !== undefined) {
      queryParameters["status"] = params["status"];
    }

    if (params["userName"] !== undefined) {
      queryParameters["userName"] = params["userName"];
    }

    if (params["userMobile"] !== undefined) {
      queryParameters["userMobile"] = params["userMobile"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 核销订单
   * @method
   * @name verifyGift
   */
  verifyGift: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/giftOrder/verify";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/x-www-form-urlencoded";

    if (params["orderNo"] !== undefined) {
      form["orderNo"] = params["orderNo"];
    }

    let url = domain + path;
    let options = {
      method: "POST",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 新闻-添加|更新 news
   * @method
   * @name addOrUpdateNews
   */
  addOrUpdateNews: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/news";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["body"] !== undefined) {
      body = params["body"];
    }

    let url = domain + path;
    let options = {
      method: "POST",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 新闻-推荐
   * @method
   * @name recommenNews
   */
  recommenNews: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/news";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["newsId"] !== undefined) {
      queryParameters["newsId"] = params["newsId"];
    }

    if (params["newsId"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: newsId"));
    }

    if (params["sort"] !== undefined) {
      queryParameters["sort"] = params["sort"];
    }

    if (params["sort"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: sort"));
    }

    if (params["recommendSign"] !== undefined) {
      queryParameters["recommendSign"] = params["recommendSign"];
    }

    if (params["recommendSign"] === undefined) {
      return Promise.reject(
        new Error("Missing required  parameter: recommendSign")
      );
    }

    let url = domain + path;
    let options = {
      method: "PUT",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 新闻-取消推荐
   * @method
   * @name cancelRecommenNews
   */
  cancelRecommenNews: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/news/cancelRecommenNews";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["newsId"] !== undefined) {
      queryParameters["newsId"] = params["newsId"];
    }

    if (params["newsId"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: newsId"));
    }

    let url = domain + path;
    let options = {
      method: "PUT",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 新闻-获取news分页
   * @method
   * @name getNewsPage
   */
  getNewsPage: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/news/page";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["pageIndex"] !== undefined) {
      queryParameters["pageIndex"] = params["pageIndex"];
    }

    if (params["pageSize"] !== undefined) {
      queryParameters["pageSize"] = params["pageSize"];
    }

    if (params["title"] !== undefined) {
      queryParameters["title"] = params["title"];
    }

    if (params["source"] !== undefined) {
      queryParameters["source"] = params["source"];
    }

    if (params["startTime"] !== undefined) {
      queryParameters["startTime"] = params["startTime"];
    }

    if (params["endTime"] !== undefined) {
      queryParameters["endTime"] = params["endTime"];
    }

    if (params["status"] !== undefined) {
      queryParameters["status"] = params["status"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 新闻-发布/下架/更新发布时间/驳回
   * @method
   * @name updateNews
   */
  updateNews: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/news/updateNews";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["id"] !== undefined) {
      queryParameters["id"] = params["id"];
    }

    if (params["id"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: id"));
    }

    if (params["status"] !== undefined) {
      queryParameters["status"] = params["status"];
    }

    if (params["status"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: status"));
    }

    if (params["reason"] !== undefined) {
      queryParameters["reason"] = params["reason"];
    }

    let url = domain + path;
    let options = {
      method: "POST",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 新闻-删除news
   * @method
   * @name deleteNews
   */
  deleteNews: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/news/{id}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    path = path.replace("{id}", params["id"]);

    if (params["id"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: id"));
    }

    let url = domain + path;
    let options = {
      method: "DELETE",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 添加|更新 questClass
   * @method
   * @name addOrUpdateQuestClass
   */
  addOrUpdateQuestClass: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/questClass";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["body"] !== undefined) {
      body = params["body"];
    }

    let url = domain + path;
    let options = {
      method: "POST",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 题库分类-获取列表
   * @method
   * @name getQuestClassList
   */
  getQuestClassList: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/questClass/list";
    let body = {};
    let queryParameters = params;
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 题库分类-获取单个
   * @method
   * @name getQuestClass
   */
  getQuestClass: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/questClass/{id}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    path = path.replace("{id}", params["id"]);

    if (params["id"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: id"));
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 删除questClass
   * @method
   * @name deleteQuestClass
   */
  deleteQuestClass: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/questClass/{id}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    path = path.replace("{id}", params["id"]);

    if (params["id"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: id"));
    }

    let url = domain + path;
    let options = {
      method: "DELETE",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 普通题库-添加|更新 question
   * @method
   * @name addOrUpdateQuestion
   */
  addOrUpdateQuestion: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/question";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["body"] !== undefined) {
      body = params["body"];
    }

    let url = domain + path;
    let options = {
      method: "POST",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 普通题库-导入题库
   * @method
   * @name importQuestion
   */
  importQuestion: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/question/import/{fileName}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    path = path.replace("{fileName}", params["fileName"]);

    if (params["fileName"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: fileName"));
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 普通题库-获取question分页
   * @method
   * @name getQuestionPage
   */
  getQuestionPage: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/question/page";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["pageIndex"] !== undefined) {
      queryParameters["pageIndex"] = params["pageIndex"];
    }

    if (params["pageSize"] !== undefined) {
      queryParameters["pageSize"] = params["pageSize"];
    }

    if (params["type"] !== undefined) {
      queryParameters["type"] = params["type"];
    }

    if (params["title"] !== undefined) {
      queryParameters["title"] = params["title"];
    }

    if (params["classIds"] !== undefined) {
      queryParameters["classIds"] = params["classIds"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 普通题库-获取单个question
   * @method
   * @name getQuestion
   */
  getQuestion: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/question/{id}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    path = path.replace("{id}", params["id"]);

    if (params["id"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: id"));
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 普通题库-删除question
   * @method
   * @name deleteQuestion
   */
  deleteQuestion: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/question/{id}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    path = path.replace("{id}", params["id"]);

    if (params["id"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: id"));
    }

    let url = domain + path;
    let options = {
      method: "DELETE",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 积分-获取分页
   * @method
   * @name getScoreRecordPage
   */
  getScoreRecordPage: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/score/record/page";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["pageIndex"] !== undefined) {
      queryParameters["pageIndex"] = params["pageIndex"];
    }

    if (params["pageSize"] !== undefined) {
      queryParameters["pageSize"] = params["pageSize"];
    }

    if (params["startTime"] !== undefined) {
      queryParameters["startTime"] = params["startTime"];
    }

    if (params["endTime"] !== undefined) {
      queryParameters["endTime"] = params["endTime"];
    }

    if (params["userName"] !== undefined) {
      queryParameters["userName"] = params["userName"];
    }

    if (params["type"] !== undefined) {
      queryParameters["type"] = params["type"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 积分-获取单个
   * @method
   * @name getScoreRecord
   */
  getScoreRecord: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/score/record/{id}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    path = path.replace("{id}", params["id"]);

    if (params["id"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: id"));
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 获取积分统计信息
   * @method
   * @name getScoreStat
   */
  getScoreStat: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/score/stat";
    let body = {};
    let queryParameters = params;
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 获取系统配置
   * @method
   * @name getSetting
   */
  getSetting: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/setting";
    let body = {};
    let queryParameters = params;
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 配置关于我们
   * @method
   * @name addOrUpdateAboutSetting
   */
  addOrUpdateAboutSetting: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/setting/about";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["content"] !== undefined) {
      queryParameters["content"] = params["content"];
    }

    let url = domain + path;
    let options = {
      method: "POST",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 配置App
   * @method
   * @name addOrUpdateAppSetting
   */
  addOrUpdateAppSetting: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/setting/app";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["version"] !== undefined) {
      queryParameters["version"] = params["version"];
    }

    if (params["downurl"] !== undefined) {
      queryParameters["downurl"] = params["downurl"];
    }

    let url = domain + path;
    let options = {
      method: "POST",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 获取安全知识大讲堂链接
   * @method
   * @name getHallSetting
   */
  getHallSetting: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/setting/getHall";
    let body = {};
    let queryParameters = params;
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 配置h5版本
   * @method
   * @name addOrUpdateH5Version
   */
  addOrUpdateH5Version: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/setting/h5";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["h5"] !== undefined) {
      queryParameters["h5"] = params["h5"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 配置安全知识大讲堂
   * @method
   * @name addOrUpdateHallSetting
   */
  addOrUpdateHallSetting: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/setting/hall";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["link"] !== undefined) {
      queryParameters["link"] = params["link"];
    }

    let url = domain + path;
    let options = {
      method: "POST",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 配置App图片
   * @method
   * @name addOrUpdateAppImage
   */
  addOrUpdateAppImage: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/setting/image";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["image"] !== undefined) {
      queryParameters["image"] = params["image"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 配置玩法介绍
   * @method
   * @name addOrUpdateInstrSetting
   */
  addOrUpdateInstrSetting: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/setting/instr";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["instr"] !== undefined) {
      queryParameters["instr"] = params["instr"];
    }

    let url = domain + path;
    let options = {
      method: "POST",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 配置练习
   * @method
   * @name addOrUpdateTrainSetting
   */
  addOrUpdateTrainSetting: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/setting/train";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["usertype"] !== undefined) {
      queryParameters["usertype"] = params["usertype"];
    }

    if (params["num"] !== undefined) {
      queryParameters["num"] = params["num"];
    }

    let url = domain + path;
    let options = {
      method: "POST",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 综合完成率统计-新增统计
   * @method
   * @name complexAdd
   */
  complexAdd: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/statistic/complex/add";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["body"] !== undefined) {
      body = params["body"];
    }

    let url = domain + path;
    let options = {
      method: "POST",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 统计分析-区域完成率
   * @method
   * @name complexAreaResult
   */
  complexAreaResult: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/statistic/complex/area";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["startDate"] !== undefined) {
      queryParameters["startDate"] = params["startDate"];
    }

    if (params["endDate"] !== undefined) {
      queryParameters["endDate"] = params["endDate"];
    }

    if (params["by"] !== undefined) {
      queryParameters["by"] = params["by"];
    }

    if (params["order"] !== undefined) {
      queryParameters["order"] = params["order"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 统计分析-企业完成率
   * @method
   * @name complexDepartResult
   */
  complexDepartResult: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/statistic/complex/depart";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["pageIndex"] !== undefined) {
      queryParameters["pageIndex"] = params["pageIndex"];
    }

    if (params["pageSize"] !== undefined) {
      queryParameters["pageSize"] = params["pageSize"];
    }

    if (params["area"] !== undefined) {
      queryParameters["area"] = params["area"];
    }

    if (params["departName"] !== undefined) {
      queryParameters["departName"] = params["departName"];
    }

    if (params["startDate"] !== undefined) {
      queryParameters["startDate"] = params["startDate"];
    }

    if (params["endDate"] !== undefined) {
      queryParameters["endDate"] = params["endDate"];
    }

    if (params["by"] !== undefined) {
      queryParameters["by"] = params["by"];
    }

    if (params["order"] !== undefined) {
      queryParameters["order"] = params["order"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 统计分析-综合完成率
   * @method
   * @name complexList
   */
  complexList: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/statistic/complex/list";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["pageIndex"] !== undefined) {
      queryParameters["pageIndex"] = params["pageIndex"];
    }

    if (params["pageSize"] !== undefined) {
      queryParameters["pageSize"] = params["pageSize"];
    }

    if (params["title"] !== undefined) {
      queryParameters["title"] = params["title"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 综合完成率统计-查看结果
   * @method
   * @name complexResult
   */
  complexResult: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/statistic/complex/result";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["id"] !== undefined) {
      queryParameters["id"] = params["id"];
    }

    if (params["startDate"] !== undefined) {
      queryParameters["startDate"] = params["startDate"];
    }

    if (params["endDate"] !== undefined) {
      queryParameters["endDate"] = params["endDate"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 统计分析-个人完成率
   * @method
   * @name getPersonalStatisticPage
   */
  getPersonalStatisticPage: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/statistic/personal";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["pageIndex"] !== undefined) {
      queryParameters["pageIndex"] = params["pageIndex"];
    }

    if (params["pageSize"] !== undefined) {
      queryParameters["pageSize"] = params["pageSize"];
    }

    if (params["departName"] !== undefined) {
      queryParameters["departName"] = params["departName"];
    }

    if (params["name"] !== undefined) {
      queryParameters["name"] = params["name"];
    }

    if (params["startDate"] !== undefined) {
      queryParameters["startDate"] = params["startDate"];
    }

    if (params["endDate"] !== undefined) {
      queryParameters["endDate"] = params["endDate"];
    }

    if (params["by"] !== undefined) {
      queryParameters["by"] = params["by"];
    }

    if (params["order"] !== undefined) {
      queryParameters["order"] = params["order"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 注册统计-全部／某区域
   * @method
   * @name registerStatisticAll
   */
  registerStatisticAll: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/statistic/register/all";
    let body = {};
    let queryParameters = params;
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 注册统计-按区域
   * @method
   * @name registerStatisticArea
   */
  registerStatisticArea: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/statistic/register/area";
    let body = {};
    let queryParameters = params;
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 综合完成率统计-删除
   * @method
   * @name deleteStatistic
   */
  deleteStatistic: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/statistic/{id}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    path = path.replace("{id}", params["id"]);

    if (params["id"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: id"));
    }

    let url = domain + path;
    let options = {
      method: "DELETE",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 意见反馈-获取分页
   * @method
   * @name getSuggestionPage
   */
  getSuggestionPage: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/suggestion/page";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["pageIndex"] !== undefined) {
      queryParameters["pageIndex"] = params["pageIndex"];
    }

    if (params["pageSize"] !== undefined) {
      queryParameters["pageSize"] = params["pageSize"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 意见反馈-添加或修改
   * @method
   * @name Api#addOrUpdateSuggestion
   */
  addOrUpdateSuggestion(params) {
    var domain = window.api.domain + `/api`;
    var path = "/suggestion";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["body"] !== undefined) {
      body = params["body"];
    }

    let url = domain + path;
    let options = {
      method: "POST",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 意见反馈-获取意见
   * @method
   * @name getSuggestion
   */
  getSuggestion: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/suggestion/{id}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    path = path.replace("{id}", params["id"]);

    if (params["id"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: id"));
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 意见反馈-删除
   * @method
   * @name deleteSuggestion
   */
  deleteSuggestion: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/suggestion/{id}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    path = path.replace("{id}", params["id"]);

    if (params["id"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: id"));
    }

    let url = domain + path;
    let options = {
      method: "DELETE",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 获取区域树形结构
   * @method
   * @name getAreas
   */
  getAreas: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/sysArea";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["code"] !== undefined) {
      queryParameters["code"] = params["code"];
    }

    if (params["recursion"] !== undefined) {
      queryParameters["recursion"] = params["recursion"];
    }

    if (params["level"] !== undefined) {
      queryParameters["level"] = params["level"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 获取tSUser分页
   * @method
   * @name getTSUserPage
   */
  getTSUserPage: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/tSUser";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["pageIndex"] !== undefined) {
      queryParameters["pageIndex"] = params["pageIndex"];
    }

    if (params["pageSize"] !== undefined) {
      queryParameters["pageSize"] = params["pageSize"];
    }

    if (params["area"] !== undefined) {
      queryParameters["area"] = params["area"];
    }

    if (params["departId"] !== undefined) {
      queryParameters["departId"] = params["departId"];
    }

    if (params["name"] !== undefined) {
      queryParameters["name"] = params["name"];
    }

    if (params["phone"] !== undefined) {
      queryParameters["phone"] = params["phone"];
    }

    if (params["userType"] !== undefined) {
      queryParameters["userType"] = params["userType"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 修改tSUser
   * @method
   * @name updateUserInfo
   */
  updateUserInfo: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/tSUser";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["body"] !== undefined) {
      body = params["body"];
    }

    let url = domain + path;
    let options = {
      method: "POST",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 用户审核
   * @method
   * @name checkUser
   */
  checkUser: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/tSUser/checkUser";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["usId"] !== undefined) {
      queryParameters["usId"] = params["usId"];
    }

    if (params["status"] !== undefined) {
      queryParameters["status"] = params["status"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 通过手机号获取用户信息
   * @method
   * @name getTSUserByMoblie
   */
  getTSUserByMoblie: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/tSUser/getTSUserByMobile/{mobile}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    path = path.replace("{mobile}", params["mobile"]);

    if (params["mobile"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: mobile"));
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 通过用户名获取用户信息
   * @method
   * @name getTSUserByUserName
   */
  getTSUserByUserName: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/tSUser/getTSUserByUserName/{username}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    path = path.replace("{username}", params["username"]);

    if (params["username"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: username"));
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 获取用户信息
   * @method
   * @name getTSUser
   */
  getTSUser: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/tSUser/ownInfo";
    let body = {};
    let queryParameters = params;
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 获取用户所有的权限
   * @method
   * @name getUserPermissions
   */
  getUserPermissions: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/tSUser/permissions";
    let body = {};
    let queryParameters = params;
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 通过id删除tSUser
   * @method
   * @name deleteTSUser
   */
  deleteTSUser: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/tSUser/{id}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    path = path.replace("{id}", params["id"]);

    if (params["id"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: id"));
    }

    let url = domain + path;
    let options = {
      method: "DELETE",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 任务下发-添加任务
   * @method
   * @name addOrUpdateTask
   */
  addOrUpdateTask: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/task";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["body"] !== undefined) {
      body = params["body"];
    }

    let url = domain + path;
    let options = {
      method: "POST",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 任务下发-获取分页
   * @method
   * @name getTaskPage
   */
  getTaskPage: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/task/page";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["pageIndex"] !== undefined) {
      queryParameters["pageIndex"] = params["pageIndex"];
    }

    if (params["pageSize"] !== undefined) {
      queryParameters["pageSize"] = params["pageSize"];
    }

    if (params["title"] !== undefined) {
      queryParameters["title"] = params["title"];
    }

    if (params["userType"] !== undefined) {
      queryParameters["userType"] = params["userType"];
    }

    if (params["departId"] !== undefined) {
      queryParameters["departId"] = params["departId"];
    }

    if (params["departCategoryId"] !== undefined) {
      queryParameters["departCategoryId"] = params["departCategoryId"];
    }

    if (params["status"] !== undefined) {
      queryParameters["status"] = params["status"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 重发未下发完成的任务
   * @method
   * @name reSendTask
   */
  reSendTask: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/task/reSendTask/{id}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    path = path.replace("{id}", params["id"]);

    if (params["id"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: id"));
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 任务下发-获取单个
   * @method
   * @name getTask
   */
  getTask: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/task/{id}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    path = path.replace("{id}", params["id"]);

    if (params["id"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: id"));
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 删除task
   * @method
   * @name deleteTask
   */
  deleteTask: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/task/{id}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    path = path.replace("{id}", params["id"]);

    if (params["id"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: id"));
    }

    let url = domain + path;
    let options = {
      method: "DELETE",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 视频题库-添加|更新 video
   * @method
   * @name addOrUpdateVideo
   */
  addOrUpdateVideo: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/video";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["body"] !== undefined) {
      body = params["body"];
    }

    let url = domain + path;
    let options = {
      method: "POST",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 视频题库-获取视频分页
   * @method
   * @name getVideoPage
   */
  getVideoPage: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/video/page";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["pageIndex"] !== undefined) {
      queryParameters["pageIndex"] = params["pageIndex"];
    }

    if (params["pageSize"] !== undefined) {
      queryParameters["pageSize"] = params["pageSize"];
    }

    if (params["title"] !== undefined) {
      queryParameters["title"] = params["title"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 视频题库-获取单个video
   * @method
   * @name getVideo
   */
  getVideo: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/video/{id}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    path = path.replace("{id}", params["id"]);

    if (params["id"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: id"));
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 视频题库-删除video
   * @method
   * @name deleteVideo
   */
  deleteVideo: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/video/{id}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    path = path.replace("{id}", params["id"]);

    if (params["id"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: id"));
    }

    let url = domain + path;
    let options = {
      method: "DELETE",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 视频练习题-添加|更新
   * @method
   * @name addOrUpdateVideoQuestion
   */
  addOrUpdateVideoQuestion: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/videoQuestion";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["body"] !== undefined) {
      body = params["body"];
    }

    let url = domain + path;
    let options = {
      method: "POST",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 视频练习题-获取列表
   * @method
   * @name getVideoQuestionList
   */
  getVideoQuestionList: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/videoQuestion/list";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["videoId"] !== undefined) {
      queryParameters["videoId"] = params["videoId"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 视频练习题-获取分页
   * @method
   * @name getVideoQuestionPage
   */
  getVideoQuestionPage: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/videoQuestion/page";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    if (params["pageIndex"] !== undefined) {
      queryParameters["pageIndex"] = params["pageIndex"];
    }

    if (params["pageSize"] !== undefined) {
      queryParameters["pageSize"] = params["pageSize"];
    }

    if (params["videoId"] !== undefined) {
      queryParameters["videoId"] = params["videoId"];
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 视频练习题-获取单个
   * @method
   * @name getVideoQuestion
   */
  getVideoQuestion: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/videoQuestion/{id}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    path = path.replace("{id}", params["id"]);

    if (params["id"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: id"));
    }

    let url = domain + path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  },
  /**
   * 视频练习题-删除videoQuestion
   * @method
   * @name deleteVideoQuestion
   */
  deleteVideoQuestion: (params = {}) => {
    let domain = window.api.domain + `/api`;
    let path = "/videoQuestion/{id}";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/json";

    path = path.replace("{id}", params["id"]);

    if (params["id"] === undefined) {
      return Promise.reject(new Error("Missing required  parameter: id"));
    }

    let url = domain + path;
    let options = {
      method: "DELETE",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }

    return axios(options).then(ret => {
      return ret;
    });
  }
};
